import request from '@/utils/request'

export function merge(list) {
  return request({
    url: `/api/ware/purchase/merge`,
    method: 'post',
    data: list
  })
}

export function unReceive(query) {
  return request({
    url: `/api/ware/purchase/unreceive/list`,
    method: 'post',
    data: query
  })
}

export function list(query) {
  return request({
    url: `/api/ware/purchase/list`,
    method: 'post',
    data: query
  })
}

export function info(id) {
  return request({
    url: `/api/ware/purchase/info/${id}`,
    method: 'get',
    param: id
  })
}

export function add(list) {
  return request({
    url: '/api/ware/purchase/save',
    method: 'post',
    data: list
  })
}

export function delMultiple(ids) {
  return request({
    url: '/api/ware/purchase/delete',
    method: 'post',
    data: ids
  })
}

export function update(list) {
  return request({
    url: '/api/ware/purchase/update',
    method: 'post',
    data: list
  })
}
